package org.halk.bio;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.Socket;

public class BIOClient {

    public static void main(String[] args) throws IOException, InterruptedException {
        Socket socket = new Socket("127.0.0.1", 6688);
        System.out.println("客户端启动");
        BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
        System.out.println("客户端发送消息");
        bufferedWriter.write("你好，我是client");
        bufferedWriter.flush();

        Thread.sleep(100000);

        socket.shutdownOutput();
    }
}
